package com.canaan.business.domain.bill;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.canaan.common.annotation.Excel;
import com.canaan.common.core.domain.BaseEntity;
import com.canaan.common.annotation.TableName;

import java.util.Date;

/**
 * 托盘明细对象 wms_tray_detail
 *
 * @author canaan
 * @date 2025-03-28
 */
@Data
@ApiModel(description = "wms_tray_detail")
@TableName("wms_tray_detail")
public class TrayDetail extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** ID */
    @ApiModelProperty("${comment}")
    private Long id;

    /** 托盘号 */
    @Excel(name = "托盘号")
    @ApiModelProperty("托盘号")
    private String trayNo;

    /** 库存状态 */
    @Excel(name = "库存状态")
    @ApiModelProperty("库存状态")
    private String stockStatus;

    /** 物料编号 */
    @Excel(name = "物料编号")
    @ApiModelProperty("物料编号")
    private String productNo;

    /** 物料名称 */
    @Excel(name = "物料名称")
    @ApiModelProperty("物料名称")
    private String productName;

    /** 物料单位 */
    @Excel(name = "物料单位")
    @ApiModelProperty("物料单位")
    private String productUnit;

    /** 数量 */
    @Excel(name = "数量")
    @ApiModelProperty("数量")
    private Long qty;

    /** 批次号 */
    @Excel(name = "批次号")
    @ApiModelProperty("批次号")
    private String batchNo;

    /** 是否删除：1是 0否 */
    @ApiModelProperty("批次号")
    private String delFlag;

    /**
     * 生产日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date productionDate;

    /**
     * 有效天数
     */
    @Excel(name = "有效天数")
    private Integer validDateNum;



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("trayNo", getTrayNo())
            .append("stockStatus", getStockStatus())
            .append("productNo", getProductNo())
            .append("productName", getProductName())
            .append("productUnit", getProductUnit())
            .append("qty", getQty())
            .append("batchNo", getBatchNo())
            .append("remark", getRemark())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("createTime", getCreateTime())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
